package org.sgs.toolbox.sql;

public class SqlRunner {
	
	
	public static void main(String[] args) {
		
		// Pull query from command line
		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < args.length; i++){
			sb.append(args[i]);
			if(i < args.length - 1){
				sb.append(" ");
			}
		}
		
		// Get records for query
		String query = sb.toString();
		GenericRecordList recordList = SqlUtils.queryForList(query);
		
		// Report results to stdout
		System.out.printf("%s\n", recordList.asCsv());
		
	}
	
}
